<?php
include "../includes/global.php";
include "auth.php";


if(isset($_SESSION['admin_role'])){
    if($_SESSION['admin_role']==3){
        session_unset();
        redir(URL_SITE. 'bo/index.php');
        
    }
}
/**
 *
 */
include_once(PATH_VIEW_ADMIN . 'index.php');
/**
 *
 */
 /*
  * Integrate 2 types of user account
  *
if(getUserRole()==1)
    $sModule = isset($_GET[sMod]) ? $_GET[sMod] : 'home';
else
    $sModule = isset($_GET[sMod]) ? $_GET[sMod] : 'top_page';
  *
  */
$sModule = isset($_GET[sMod]) ? $_GET[sMod] : 'home';
$sModuleDir = PATH_CONTROL_ADMIN . $sModule. '.php';

if(!is_file($sModuleDir)) {
    $sModuleDir = PATH_CONTROL_ADMIN . '404.php';
}

/*
$arr_module=explode(' ',STAFF_NOMODULE);
foreach($arr_module as $row) {
    if($row==$sModule&& getUserRole()!=1) {
        redir('?sMod=top_page');
    }
}
 * 
 */
include($sModuleDir);
?>